<!--
 * @Author: 闫一丹 1437921153@qq.com
 * @Date: 2022-12-27 13:00:34
 * @LastEditors: chaixinyu
 * @LastEditTime: 2022-12-30 16:16:05
 * @FilePath: \vue-xuexitong\src\views\NONote.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup>
// 引入路由
import { useRouter } from 'vue-router'

// 实例化路由
const router = useRouter()
// const onClickRight = () => {
//     跳转至编辑页-writeNote
// router.push
// }
function goback() {
  // 返回上一页

  router.go(-1);
}
const toWrite = () => {
    router.push('/writenote')
}
</script>

<template>
  <div class="no_note">
    <div class="nav">
      <i class="iconfont icon-zuosanjiao" @click="goback"></i>
      <span><i class="iconfont icon-24gf-folderShare"></i>公开笔记</span>
      <van-icon name="edit" size="18" @click="onClickRight" />
    </div>
    <div class="tips">还没有笔记，<span @click="toWrite">写一条</span>吧！</div>
  </div>
</template>

<style lang="less" scoped>
.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  border-bottom: 1px solid #dad8d8;
  .iconfont {
    font-size: 20px;
    vertical-align: middle;
  }
  span i {
    padding: 0 5px;
    color: rgba(30, 144, 255, 0.4);
  }
  .van-icon-edit:before {
    margin-right: 4px;
    margin-top: 3px;
  }
}
.tips {
  margin: 65% auto;
  text-align: center;
  span {
    color: rgb(30, 144, 255);
  }
}
</style>